load("//:build_variables.bzl", "COPTS")
load("//tools/lint:linters.bzl", "clang_tidy_test")

package(
    default_visibility = ["//:android_cuttlefish"],
)

proto_library(
    name = "user_config_proto",
    srcs = ["user_config.proto"],
)

cc_proto_library(
    name = "user_config_cc_proto",
    deps = [":user_config_proto"],
)

cc_library(
    name = "acloud",
    srcs = [
        "config.cpp",
        "converter.cpp",
        "create_converter_parser.cpp",
    ],
    hdrs = [
        "config.h",
        "converter.h",
        "create_converter_parser.h",
    ],
    copts = COPTS + [ "-Werror=sign-compare" ],
    deps = [
        ":user_config_cc_proto",
        "//cuttlefish/common/libs/fs",
        "//cuttlefish/common/libs/utils:environment",
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:flag_parser",
        "//cuttlefish/common/libs/utils:result",
        "//cuttlefish/common/libs/utils:subprocess",
        "//cuttlefish/common/libs/utils:users",
        "//cuttlefish/host/commands/cvd/cli/selector:parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli:utils",
        "//cuttlefish/host/commands/cvd/instances/lock",
        "//cuttlefish/host/commands/cvd/instances:device_name",
        "//cuttlefish/host/commands/cvd/utils",
        "//cuttlefish/host/libs/config:config_constants",
        "//libbase",
        "@protobuf",
    ],
)

clang_tidy_test(
    name = "acloud_clang_tidy",
    srcs = [":acloud"],
    tags = ["clang_tidy", "clang-tidy"],
)
